package kr.saeildamil.androidstudy.ch11;

import kr.saeildamil.androiddforstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Toast;

public class ImageButtonEX extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch11_imagebtn);
		
		Button btn1 = (Button) findViewById(R.id.ch11_btnexit);
		btn1.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Toast.makeText(ImageButtonEX.this, "Exit Button", 2000).show();
			}
		});
		
		ImageButton btn = (ImageButton) findViewById(R.id.ch11_imagebtn_btn);
		
		btn.setOnClickListener(new OnClickListener() {
		
			@Override
			public void onClick(View v) {
				Toast.makeText(ImageButtonEX.this, "Image Button", 2000).show();

			}
		});
	}
}
